﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Oracle.DataAccess.Client;

namespace Tamaris
{
    public partial class Connexion : Form
    {
        public Connexion()
        {
            InitializeComponent();
        }

        private void Identifiant_MouseClick(object sender, MouseEventArgs e)
        {
            Identifiant.Text = "";
        }

        private void Bouton_connexion_Click(object sender, EventArgs e)
        {
            try
            {
                OracleConnection OConnexion = new OracleConnection();
                OConnexion.ConnectionString = "Data Source=10.154.126.50:1521/tama;User Id=" + Identifiant.Text + ";Password=" + Mot_de_passe.Text + ";";
                OConnexion.Open();
                Main affichage_main = new Main(this);
                affichage_main.Show();
                this.Hide();
            }
            catch (Exception)
            {
                erreur.Text = "Identifiant incorrect";
            }
        }

        private void Mot_de_passe_MouseClick(object sender, MouseEventArgs e)
        {
            Mot_de_passe.Text = "";
        }
    }
}
